//
//  ViewController.m
//  07-UIViewController
//
//  Created by Snow on 16/7/22.
//  Copyright © 2016年 Snow. All rights reserved.
//

#import "ViewController.h"
#import "FirstViewController.h"

@interface ViewController ()

@end

@implementation ViewController
- (void)loadView
{
    [super loadView];
    NSLog(@"%@--%s", [self class], __FUNCTION__);
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor cyanColor];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(handleButton:)];
    NSLog(@"%@--%s", [self class], __FUNCTION__);

}
- (void)handleButton:(UIBarButtonItem *)barButton
{
    FirstViewController *first = [[FirstViewController alloc] init];
    [self.navigationController pushViewController:first animated:YES];
}
- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    NSLog(@"%@--%s", [self class], __FUNCTION__);

}
- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    NSLog(@"%@--%s", [self class], __FUNCTION__);

}
- (void)viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];
    NSLog(@"%@--%s", [self class], __FUNCTION__);

}
- (void)viewDidDisappear:(BOOL)animated
{
    [super viewDidDisappear:animated];
    NSLog(@"%@--%s", [self class], __FUNCTION__);

}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
